package com.pan.download5.search;

import com.pan.crawler.Search;
import com.pan.download5.config.SearchConfig;

import java.util.List;

/**
 * 调用的Console
 *
 */
public class FastSearchDriver implements SearchDriver , SearchConfig {

    private SearchDriver searchDriver;

    public FastSearchDriver(){
        List<Class<? extends Search>> classList = this.getClassList();
        Class<? extends  Search>[] searchClasses = new Class[classList.size()];
        searchDriver = new ConsoleSearchDriver(classList.toArray(searchClasses));
    }

    @Override
    public void run() {
        searchDriver.run();
    }
}
